Skip to content

verify hooks#656

Closed
mishaschwartz wants to merge 1 commit into
masterfrom
verify-hooks
Closed

verify hooks#656
mishaschwartz wants to merge 1 commit into
masterfrom
verify-hooks

Conversation

@mishaschwartz

Copy link
Copy Markdown
Collaborator

Add new hook type which is called before verify and can be used to force the verify endpoint to return a "403" response.

Must be implemented with bird-house/twitcher#151

TODO:

  • add tests
  • update documentation
  • update changelog

@mishaschwartz mishaschwartz requested a review from fmigneault May 22, 2026 14:43
@github-actions github-actions Bot added the plugin Service plugin label May 22, 2026
@mishaschwartz mishaschwartz mentioned this pull request May 22, 2026
3 tasks

@fmigneault fmigneault left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need the corresponding updates when available (from bird-house/twitcher#151):

pyramid-twitcher>=0.11.0

FROM birdhouse/twitcher:v0.11.0

"""
def _discover_hooks(self, instance, service_name, hook_type, method, path, query):
# type: (Union[Request, Response], Str, ServiceHookType, Str, Str, Str, bool) -> Iterable[Tuple[Callable, Str, Str]]
"""Yields hook functions."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the multiline docstring.
Same for others.

Comment on lines +428 to +429
.. versionadded:: 5.0.3
Requires ``Twitcher >= 0.11.2``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magpie 5.2.0
twitcher 0.12.0

@mishaschwartz

Copy link
Copy Markdown
Collaborator Author

This feature is no longer needed and I'm not convinced that this makes sense really to be able to short-circuit the entire auth mechanism set up by magpie and twitcher.

If anyone is interested in revisiting this later please feel free to re-open this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin Service plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants